<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0">
    <title>回执单模板</title>
    <style type="text/css">
        body {
            margin: 0;
            padding: 0;
            font: 12pt "Microsoft YaHei";
            table-layout: fixed;
        }

        .page {
            margin: 0 auto;
            position: relative;
            height: auto;
        }

        .showPaper {
            width: 21cm;
            padding: 0.445cm 0.5cm;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.15)
        }

        @page {
            size: A5 landscape;
        }

        @media print {
            .page {
                margin: 0;
                border: initial;
                border-radius: initial;
                width: initial; /*21*/
                min-height: initial;
                box-shadow: initial;
                background: initial;
                page-break-after: always;
                position: relative;
            }
        }
        .over-title {
            padding: 4px 12px;
            border: 1px double #FF0000;
            color: #FF0000;
            font-size: 14px;
            position: absolute;
            font-weight: bold;
            top: 42px;
            left: 40%;
        }
        .over-tip {
            padding: 5px 16px;
            border: 2px double #FF0000;
            color: #FF0000;
            font-size: 18px;
            position: absolute;
            font-weight: bold;
            top: 0;
            left: 65%;
        }
        .over-seal {
            width: 4.6cm;
            position: absolute;
            top: 36%;
            left: 40%;
        }

        .fixed-sign {
            height: 2cm;
            position: absolute;
            right: 1cm;
            bottom: 0.5cm;
        }

        .body-title {
            align-items: center;
            display: flex;
            color: #2C2C2C;
            width: 100%;
            font-weight: 800;
            height: 60px;
            font-size: 18px;
        }

        .plat-title {
            width: 100%;
            height: 48px;;
            margin-left: 4px;
            margin-right: 4px;
        }

        .plat-title-logo {
            height: 45px;
            float: left;
        }

        .plat-title-head {
            float: left;
            margin-left: 12px;
        }

        .plat-title-bar {
            float: right;
        }

        .plat-title-bar img {
            height: 32px;
            width: 180px;
        }

        .plat-title-bar div {
            height: 14px;
            font-weight: normal;
            font-size: 12px;
            text-align: center;
        }

        /*表格头*/
        .body-sub {
            width: 100%;
            border-top: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
            height: 34px;
            line-height: 34px;
            font-size: 13px;
        }

        .body-sub div {
            width: 33%;
            text-align: center;
            float: left;
        }

        table {
            width: 100%;
        }

        /*表格属性*/
        table,
        td,
        th {
            border-collapse: collapse;
        }

        /*横向表格内容*/
        .tds {
            height: 30px;
            font-size: 13px;
            border-left: 1px solid rgba(173, 189, 204, 0.51);
            border-right: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
        }

        /*表格表头标题*/
        .tdt {
            height: 30px;
            font-size: 14px;
            font-weight: 800;
            border-left: 1px solid rgba(173, 189, 204, 0.51);
            border-right: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
        }

        /*纵向表格内容*/
        .tdm {
            height: 30px;
            font-size: 14px;
            font-weight: 400;
            border-left: 1px solid rgba(173, 189, 204, 0.51);
            border-right: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
        }

        .text-center {
            text-align: center;
        }

        .td-pd6 {
            padding: 6px;
        }

        .td-w100 {
            width: 100px;
        }

        .td-w-auto {
            width: 210px;
        }

        .tips {
            color: #FF0000;
            height: 70px;
            font-weight: 800;
            text-align: left;
        }

    </style>
</head>
<body>
<div class="book" id="book">
    <div class="page" th:classappend="${!pdfPrint?'showPaper':''}">
        <div class="subpage" style="position: relative">
            <div class="body-title">
                <div class="plat-title">
                    <img class="plat-title-logo" src="http://117.187.230.142:9000/auth/20230509F025D9B00D904C32814F4270A388E6BC.png" alt="">
                    <div class="plat-title-head" style="min-width: 50%">
                        <div>网络货运平台道路货物运输电子签收回单</div>
                        <div style="font-size: 13px;font-weight: 500;margin-top: 6px">运营平台主体：<span th:text="${receiptOrder.platName}"></span></div>
                    </div>
                    <div class="plat-title-bar">
                        <img th:src="'data:image/png;base64,'+${barCodeImage}" alt="barCodeImage"/>
                        <div th:text="'NO.'+${receiptOrder.receiptNo}"></div>
                    </div>
                </div>
            </div>
            <table class="body-sub">
                <tr>
                    <td class="text-center" th:text="'合同编号：'+${receiptOrder.contractNo}">合同编号：</td>
                    <td class="text-center" th:text="'订单编号：'+${receiptOrder.transportNo}">订单编号：</td>
                    <td class="text-center" th:text="'签收时间：'+${#dates.format(receiptOrder.receiptTime,'yyyy/MM/dd HH:mm:ss')}">签收时间：</td>
                </tr>
            </table>
            <table>
                <tr>
                    <td class="text-center td-w100 tdt">托运人</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${receiptOrder.shipperOrganizeName}"></td>
                    <td class="text-center td-w100 tdt">实际承运人</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${receiptOrder.robOrganizeName}"></td>
                </tr>
                <tr>
                    <td class="text-center td-w100 tdt">运输车辆</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${receiptOrder.transitTruckNo}"></td>
                    <td class="text-center td-w100 tdt">运输司机</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${receiptOrder.transitTruckUserName}"></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td rowspan="3" class="td-w100 text-center tdt">发货人</td>
                    <td class="tds td-pd6 td-w-auto" th:text="'姓名丨电话：'+${receiptOrder.deliveryName}+'丨'+${receiptOrder.deliveryPhone}"></td>
                    <td rowspan="3" class="td-w100 text-center tdt">收货人</td>
                    <td class="tds td-pd6 td-w-auto" th:text="'姓名丨电话：'+${receiptOrder.receiptName}+'丨'+${receiptOrder.receiptPhone}"></td>
                </tr>
                <tr>
                    <td class="tds td-pd6 td-w-auto " th:text="'发货时间：'+${#dates.format(receiptOrder.deliveryTime,'yyyy/MM/dd HH:mm:ss')}"></td>
                    <td class="tds td-pd6 td-w-auto " th:text="'收货时间：'+${#dates.format(receiptOrder.receiptTime,'yyyy/MM/dd HH:mm:ss')}"></td>
                </tr>
                <tr>
                    <td class="tds td-pd6 td-w-auto " th:text="'发货地址：'+${receiptOrder.deliveryAddress}"></td>
                    <td class="tds td-pd6 td-w-auto " th:text="'收货地址：'+${receiptOrder.receiptAddress}"></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td rowspan="99999999" class="td-w100 text-center tdt">货物明细</td>
                </tr>
                <tr>
                    <td class="text-center tdt td-pd6 td-w-auto">货物类型</td>
                    <td class="text-center tdt td-pd6 td-w-auto">货物名称</td>
                    <td class="text-center tdt td-pd6 td-w-auto">货物规格/描述</td>
                    <td class="text-center tdt td-pd6 td-w-auto">发货量</td>
                    <td class="text-center tdt td-pd6 td-w-auto">收货量</td>
                </tr>
                <tr th:each="transitOrderNoteDetail:${receiptOrder.transitOrderNoteDetailList}">
                    <td class="text-center tdm td-pd6 td-w-auto" th:text="${transitOrderNoteDetail.goodsOrderNoteDetail.goodsTypeName}"></td>
                    <td class="text-center tdm td-pd6 td-w-auto" th:text="${transitOrderNoteDetail.goodsOrderNoteDetail.goodsName}"></td>
                    <td class="text-center tdm td-pd6 td-w-auto" th:text="${transitOrderNoteDetail.goodsOrderNoteDetail.goodsDescribe}"></td>
                    <td class="text-center tdm td-pd6 td-w-auto" th:text="${transitOrderNoteDetail.deliverMeasure}+${transitOrderNoteDetail.measureUnit}"></td>
                    <td class="text-center tdm td-pd6 td-w-auto" th:text="${transitOrderNoteDetail.receiptMeasure}+${transitOrderNoteDetail.measureUnit}"></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td class="text-center td-w100 tdt">发货量合计</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${totalDeliverMeasure}"></td>
                    <td class="text-center td-w100 tdt">收货量合计</td>
                    <td class="td-pd6 td-w-auto tds" th:text="${totalReceiptMeasure}"></td>
                </tr>
            </table>
            <table>
                <tr>
                    <td class="td-pd6 td-w-auto tds tips">
                        * 重要提示：本回单作为货物重要签收依据，并具有法律效力
                    </td>
                </tr>
            </table>
        </div>
        <div th:if="${pdfPrint}" class="over-title">运单编号：<span th:text="${receiptOrder.transportNo}"></span></div>
        <div class="over-tip">合同附件</div>
        <img class="over-seal" th:src="${stampCompanySeal.receiptSeal}" alt=""/>
        <img class="fixed-sign" th:src="${receiptOrder.receiptSignImg}" alt="">
    </div>
</div>
</body>
</html>